﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Mvc3Learning.Models;

namespace Mvc3Learning.Controllers
{
    public class BlogController : Controller
    {
        //
        // GET: /Blog/

        public ActionResult Index()
        {
            BlogView  view = new BlogView();
            using (var db = new BlogDb())
            {
                view.Blogs = db.Blogs.ToList();
                return View(view);
            }
        }

    }
}
